package com.shirley.pers.zhufengfmvi.entities;

import org.json.JSONObject;

/**
 * Description: 曲目信息 <br/>
 * <p/>
 * Copyright (c) , 2016, Shirley Xian <br/>
 * This program is protected by copyright laws. <br/>
 * ClassName: Track<br/>
 * Date: 2016/4/8 13:21
 *
 * @author Shirley Xian
 * @version 1.0
 */
public class Track {

    /**
     * trackId : 14140776
     * uid : 13031006
     * playUrl64 : http://fdfs.xmcdn.com/group9/M09/3D/FF/wKgDYlcGnW6xiZI2AQypUbWg-EY569.mp3
     * playUrl32 : http://fdfs.xmcdn.com/group16/M05/3E/08/wKgDalcGoF7ABERSAIZUv1KH_rM650.mp3
     * downloadUrl : http://download.xmcdn.com/group14/M00/3F/91/wKgDY1cGnWPiYjI2AItkt1iGgn0369.aac
     * playPathAacv164 : http://audio.xmcdn.com/group12/M07/3D/CE/wKgDXFcGnXri2oc3AQ-UZYA-zuI755.m4a
     * playPathAacv224 : http://audio.xmcdn.com/group11/M0B/2F/F2/wKgDa1cGnoni9RVNAGepVZbX8uI587.m4a
     * downloadAacUrl : http://download.xmcdn.com/group11/M0B/2F/F2/wKgDa1cGnoni9RVNAGepVZbX8uI587.m4a
     * title : 段子来了羞羞版丨一个人的嗡嗡嗡，不如两个人的嗯嗯嗯60407（采采）
     * duration : 2200.84
     * albumId : 203355
     * albumTitle : 段子来了
     * albumImage : http://fdfs.xmcdn.com/group5/M03/A6/D8/wKgDtlR1MD_T1DQHAANqZDyk48s720_mobile_small.jpg
     * processState : 2
     * createdAt : 1460052069000
     * coverSmall : http://fdfs.xmcdn.com/group15/M01/3C/A1/wKgDZVcGmrXQBQRIAAIfGAC4y0c068_web_meduim.jpg
     * coverMiddle : http://fdfs.xmcdn.com/group15/M01/3C/A1/wKgDZVcGmrXQBQRIAAIfGAC4y0c068_web_large.jpg
     * coverLarge : http://fdfs.xmcdn.com/group15/M01/3C/A1/wKgDZVcGmrXQBQRIAAIfGAC4y0c068_mobile_large.jpg
     * nickname : 杜杜电台
     * smallLogo : http://fdfs.xmcdn.com/group4/M04/B0/26/wKgDs1PoOr3A3aD-AAAegRoRdlM970_mobile_small.jpg
     * userSource : 1
     * orderNum : 99999999
     * opType : 2
     * refUid : 2629577
     * refNickname : 枕边疯电台
     * refSmallLogo : http://fdfs.xmcdn.com/group3/M00/64/F8/wKgDslJ68TnQpnVPAAU-A1zGGqI128_mobile_small.jpg
     * isPublic : true
     * likes : 657
     * playtimes : 64884
     * comments : 495
     * shares : 0
     * status : 1
     * downloadSize : 9135287
     * downloadAacSize : 6793557
     */

    private long trackId;
    private long uid;
    private String playUrl64;
    private String playUrl32;
    private String downloadUrl;
    private String playPathAacv164;
    private String playPathAacv224;
    private String downloadAacUrl;
    private String title;
    private double duration;
    private long albumId;
    private String albumTitle;
    private String albumImage;
    private int processState;
    private long createdAt;
    private String coverSmall;
    private String coverMiddle;
    private String coverLarge;
    private String nickname;
    private String smallLogo;
    private int userSource;
    private int orderNum;
    private int opType;
    private int refUid;
    private String refNickname;
    private String refSmallLogo;
    private boolean isPublic;
    private long likes;
    private long playtimes;
    private long comments;
    private long shares;
    private int status;
    private long downloadSize;
    private long downloadAacSize;

    public void parseJson(JSONObject jsonObject) {
        if (jsonObject != null) {
            trackId = jsonObject.optLong("trackId");
            uid = jsonObject.optLong("uid");
            playUrl64 = jsonObject.optString("playUrl64");
            playUrl32 = jsonObject.optString("playUrl32");
            downloadUrl = jsonObject.optString("downloadUrl");
            playPathAacv164 = jsonObject.optString("playPathAacv164");
            playPathAacv224 = jsonObject.optString("playPathAacv224");
            downloadAacUrl = jsonObject.optString("downloadAacUrl");
            title = jsonObject.optString("title");
            duration = jsonObject.optDouble("duration");
            albumId = jsonObject.optLong("albumId");
            albumTitle = jsonObject.optString("albumTitle");
            albumImage = jsonObject.optString("albumImage");
            processState = jsonObject.optInt("processState");
            createdAt = jsonObject.optLong("createdAt");
            coverSmall = jsonObject.optString("coverSmall");
            coverMiddle = jsonObject.optString("coverMiddle");
            coverLarge = jsonObject.optString("coverLarge");
            nickname = jsonObject.optString("nickname");
            smallLogo = jsonObject.optString("smallLogo");
            userSource = jsonObject.optInt("userSource");
            orderNum = jsonObject.optInt("orderNum");
            opType = jsonObject.optInt("opType");
            refUid = jsonObject.optInt("refUid");
            refNickname = jsonObject.optString("refNickname");
            refSmallLogo = jsonObject.optString("refSmallLogo");
            isPublic = jsonObject.optBoolean("isPublic");
            likes = jsonObject.optLong("likes");
            playtimes = jsonObject.optLong("playtimes");
            comments = jsonObject.optLong("comments");
            shares = jsonObject.optLong("shares");
            status = jsonObject.optInt("status");
            downloadSize = jsonObject.optLong("downloadSize");
            downloadAacSize = jsonObject.optLong("downloadAacSize");
        }
    }

    public long getTrackId() {
        return trackId;
    }

    public long getUid() {
        return uid;
    }

    public String getPlayUrl64() {
        return playUrl64;
    }

    public String getPlayUrl32() {
        return playUrl32;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public String getPlayPathAacv164() {
        return playPathAacv164;
    }

    public String getPlayPathAacv224() {
        return playPathAacv224;
    }

    public String getDownloadAacUrl() {
        return downloadAacUrl;
    }

    public String getTitle() {
        return title;
    }

    public double getDuration() {
        return duration;
    }

    public long getAlbumId() {
        return albumId;
    }

    public String getAlbumTitle() {
        return albumTitle;
    }

    public String getAlbumImage() {
        return albumImage;
    }

    public int getProcessState() {
        return processState;
    }

    public long getCreatedAt() {
        return createdAt;
    }

    public String getCoverSmall() {
        return coverSmall;
    }

    public String getCoverMiddle() {
        return coverMiddle;
    }

    public String getCoverLarge() {
        return coverLarge;
    }

    public String getNickname() {
        return nickname;
    }

    public String getSmallLogo() {
        return smallLogo;
    }

    public int getUserSource() {
        return userSource;
    }

    public int getOrderNum() {
        return orderNum;
    }

    public int getOpType() {
        return opType;
    }

    public int getRefUid() {
        return refUid;
    }

    public String getRefNickname() {
        return refNickname;
    }

    public String getRefSmallLogo() {
        return refSmallLogo;
    }

    public boolean isPublic() {
        return isPublic;
    }

    public long getLikes() {
        return likes;
    }

    public long getPlaytimes() {
        return playtimes;
    }

    public long getComments() {
        return comments;
    }

    public long getShares() {
        return shares;
    }

    public int getStatus() {
        return status;
    }

    public long getDownloadSize() {
        return downloadSize;
    }

    public long getDownloadAacSize() {
        return downloadAacSize;
    }
}
